#pragma once

#ifndef CONNECTIONDIALOGH_H
#define CONNECTIONDIALOGH_H

#include "ui_ConnectionDialog.h"
#include "AppSettings.h"
#include <QtGui/QDialog>
#include <QtSql/QSqlDatabase>
#include <QtCore/QStringList>
#include <QtCore/QSettings>
#include <QtGui/QMessageBox>

class QDialog;
class QSqlDatabase;
class QStringList;
class QSettings;
class QMessageBox;

namespace SQLDoc
{
	class ConnectionDialog : public QDialog, protected Ui::ConnectionDialog
	{
		Q_OBJECT

	private slots:
		void drivers_currentIndexChanged(const QString &text);

	public:
		ConnectionDialog(QWidget* parent = 0, Qt::WFlags flags = 0);
		virtual ~ConnectionDialog();
		QString driver();
		QString hostName();
		QString userName();
		QString password();
		QString sqlEngine();
		int port();

	private:
		QStringList ODBCDriversList();
		void loadDialogSetting();
	};
}
#endif
